package com.msb.servicemap.controller;

import com.msb.internalcommon.dto.ResponseResult;
import com.msb.internalcommon.reponese.TerminalResponse;
import com.msb.servicemap.service.TerminalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther: jiudianliu
 * @Date: 2023/7/8 - 07 - 08 - 9:44
 * @Description: com.msb.servicemap.controller
 * @version: 1.0
 */
@RestController
public class TerminalController {
    @Autowired
    private TerminalService terminalService ;


    @PostMapping("/terminal/add")
    public ResponseResult<TerminalResponse> add(String name , String desc) {
        return terminalService.add(name , desc) ;
    }


    @PostMapping("/terminal/aroundsearch")
    public ResponseResult<List<TerminalResponse>> aroundsearch(String center , Integer radius){
        return terminalService.aroundsearch(center , radius) ;
    }
}
